//
// Created by lfm on 2025/3/25.
//
//#include <iostream>
//#include <string>
//using namespace std;
//template<class NameType, class AgeType = int>//默认类型
//class Person
//{
//public:
//    Person(NameType name, AgeType age) : m_Name(name)
//    {
//        this->m_Name = name;
//        this->m_Age = age;
//    }
//    void showPerson()
//    {
//        cout << "name = " << this->m_Name << " " <<"age = " << this->m_Age << endl;
//    }
//public:
//    NameType m_Name;
//    AgeType m_Age;
//};
//
////在Clion中可以运行
////类模板没有自动类型推到的使用方式
//void test01()
//{
////    Person p("zhangsan", 1900);
//    Person<string , int> p("zhangsna", 100);
//    p.showPerson();
//}
//
////2.类模板在参数列表中可以有默认参数
//void test02()
//{
//    Person<string, int> p1("Lisi", 100);
//    p1.showPerson();
//}
//int main()
//{
////    test01();
//    test02();
//    return 0;
//}
